package com.hwadee.teachingprocessmanagementsystem.dto.teacher;

import com.hwadee.teachingprocessmanagementsystem.service.base.CourseService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author LINKE
 * @ProjectName:teaching-process-management-system-back
 * @Title: TeacherScheduleInfoDto
 * @Package com.hwadee.teachingprocessmanagementsystem.dto.teacher
 * @Description: 教师课表传输对象
 * @date 2024/7/17 8:24
 */


@Data
public class TeacherScheduleInfoDto implements Serializable {

    // 课表信息
    private List<ScheduleInfo> schedules;

    /**
     * 添加一条课表信息
     * @param scheduleInfo
     */
    public void addScheduleInfo(ScheduleInfo scheduleInfo) {
        if (this.schedules == null) {
            this.schedules = new ArrayList<ScheduleInfo>();
        }
        this.schedules.add(scheduleInfo);
    }

    /**
     * 添加一条课表信息
     * @param courseName
     * @param weeks
     * @param date
     * @param time
     * @param teacherName
     * @param campus
     * @param location
     */
    public void addScheduleInfo(String courseName, String weeks, String date, String time, String teacherName, String campus, String location) {
        ScheduleInfo scheduleInfo = new ScheduleInfo();
        scheduleInfo.setCourseName(courseName);
        scheduleInfo.setWeeks(weeks);
        scheduleInfo.setDate(date);
        scheduleInfo.setTime(time);
        scheduleInfo.setTeacherName(teacherName);
        scheduleInfo.setCampus(campus);
        scheduleInfo.setLocation(location);
        addScheduleInfo(scheduleInfo);
    }

    /**
     * 获取单条课表记录
     * @return
     */
    public ScheduleInfo getScheduleInfo() {
        return new ScheduleInfo();
    }
}

/**
 * 课表信息
 */
@Data
class ScheduleInfo implements Serializable {
    // 课程名
    private String courseName;
    // 周次
    private String weeks;
    // 星期
    private String date;
    // 节次
    private String time;
    // 教师名
    private String teacherName;
    // 校区
    private String campus;
    // 地点
    private String location;
}

